import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';

extension ToastExtension on String {
  toast() {
    SmartDialog.showToast(this);
  }


}

extension ToastExtensionDouble on double? {
  double? toMoney() {
    if (this == null) {
      return null;
    } else {
      return (this!.toDouble() / 100.0);
    }
  }

}

extension ToastExtensionInt on int? {
  double? toMoney() {
    if (this == null) {
      return null;
    } else {
      return (this!.toDouble() / 100.0);
    }
  }

  String? toGender() {
    return this == 1
        ? "男"
        : this == 2
            ? "女"
            : null;
  }
}
